//
//  LLCommitOrderBottomView.m
//  LoveLove
//
//  Created by 肖兰月 on 2019/4/10.
//  Copyright © 2019 wkf. All rights reserved.
//

#import "LLCommitOrderBottomView.h"

@interface LLCommitOrderBottomView ()
@property (strong, nonatomic) UILabel *totalFeeLbl;
@property (strong, nonatomic) LLButton *commitBtn;
@end

@implementation LLCommitOrderBottomView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initSubViews];
    }
    return self;
}

- (void)initSubViews {
    _commitBtn = [LLInitBaseViewTool buttonWithTitle:@"提交订单" image:nil titleColor:UIColor.whiteColor font:17];
    _commitBtn.frame = CGRectMake(self.width-120, 0, 120, self.height);
    _commitBtn.backgroundColor = LLColor(225, 0, 0);
    [_commitBtn addTarget:self action:@selector(commitBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_commitBtn];
    
    _totalFeeLbl = [LLInitBaseViewTool labelWithText:nil textColor:nil font:0 textAlignment:NSTextAlignmentRight];
    _totalFeeLbl.frame = CGRectMake(0, 0, self.width-_commitBtn.width-20, 20);
    [self addSubview:_totalFeeLbl];
}

- (void)commitBtnClick {
    if (self.didClickCommitBlock) {
        self.didClickCommitBlock();
    }
}

@end
